<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<jsp:directive.page import="com.database.DataBase"/>
<jsp:directive.page import="com.sql.ReportFormSql"/>
<html>
  <head>
    <title></title>
  </head>
  <body>
      <%
            String AdminName=new String(request.getParameter("AdminName").toString().getBytes("ISO8859_1"));
            String AdminPwd=request.getParameter("AdminPwd");
            String ContactPhone=request.getParameter("ContactPhone");
            String roleid=request.getParameter("roleid");
	        String BranchID="";
	    	String OldBranchID = (String)session.getAttribute("oldBranchID");
	    	BranchID=OldBranchID;
	  		if(session.getAttribute("branchid")!=null){
	  			BranchID=(String)session.getAttribute("branchid");
	  		}
	  		
            DataBase db2=new DataBase();
            String sql="insert into CQMS_User(adminName,branchId,adminpwd,roleID,contactPhone)values";
                   sql=sql+"('"+AdminName+"','"+BranchID+"','"+AdminPwd+"','"+roleid+"','"+ContactPhone+"')";
            db2.executeUpdate(sql); 
            db2.closeStmt();
            db2.closeConn();
            response.sendRedirect("adminUser.jsp");
       %>
  </body>
</html>
